﻿using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;

namespace Core.Web.Api.Swagger
{
    public class SwaggerOperationFilter : IOperationFilter
    {
        public void Apply(OpenApiOperation operation, OperationFilterContext context)
        {
            //var cnt2 = context.ApiDescription.CustomAttributes().Count(m => m.GetType() == typeof(TestAttribute));
            //if (cnt2 > 0)
            //{
            //    operation.Parameters.Add(new OpenApiParameter
            //    {
            //        Name = "password",
            //        @In = ParameterLocation.Header,
            //        Description = "调用清理数据的权限密码",
            //        Required = true

            //    });
            //}


        }
    }
}
